import { sm4 } from 'sm-crypto'
const sm4Key = '509f7b2e0f67d8240a6407eaf5bb578c'

// sm4加密
export const sm4Encrypt = (content) => {
	if (content) {
		return sm4.encrypt(content, sm4Key)
	}
	return content
}

// sm4解密
export const sm4Decrypt = (content) => {
	if (content) {
		return sm4.decrypt(content, sm4Key)
	}
	return content
}
